﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace HML.SkinTool
{
    public partial class 同步主题风格Form : Form
    {
        SkinStyle skinStyle = SkinStyle.Normal;

        public 同步主题风格Form()
        {
            InitializeComponent();
        }

        public 同步主题风格Form(SkinStyle skinStyle)
        {
            this.skinStyle = skinStyle;

            InitializeComponent();
        }

        private void 新建主题Form_Load(object sender, EventArgs e)
        {
            string[] names = Enum.GetNames(typeof(SkinStyle));
            this.skinStyleCheckedListBox.Items.Clear();
            for (int i = 0; i < names.Length; i++)
            {
                if (names[i] != skinStyle.ToString())
                {
                    this.skinStyleCheckedListBox.Items.Add(names[i]);
                }
            }
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            if (this.skinStyleCheckedListBox.CheckedItems.Count < 1)
            {
                MessageBox.Show("请选择要要同步到主题风格", "操作取消");
                return;
            }
           
            this.DialogResult = DialogResult.OK;
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

    }
}
